<!-- Main content wrapper -->
<div class="wrapper">    
    <div class="widget">

        <table style="width:97%; margin-top:20px;">
            <tbody>
                <tr>
                    <?php $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();?>
                    <?php $controller = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();?>
                    <?php $module = Zend_Controller_Front::getInstance()->getRequest()->getModuleName();?>
                    <?php $lang =  Zend_Controller_Front::getInstance()->getRequest()->getBaseUrl();?>
                    <td width=45%>
                        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/updatesystem'; ?>' method="post" class="form">
                            <div class="formRow" style="border-bottom-style: none; padding-top: 0px; padding-bottom: 0px;">
                                <label>Курс обмена между USD и UAH:</label>
                                <div class="formRight" style="margin-right:0; margin-left: 10px; width: 100px; float:left;">
                                    <input type="text" name="exchange_rate" value='<?php echo $this->systemSettings['exchange_rate']; ?>' /></div>
                            </div>
                            <input type="submit" name="submit_exchange_rate" value="Сохранить" class="button basic" style="float:right"/>
                        </form>
                    </td>
                    
                    <td style="padding-left: 30px;">
                        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/updatesystem'; ?>' method="post" class="form">
                            <div class="formRow" style="border-bottom-style: none; padding-top: 0px; padding-bottom: 0px;">
                                <label>Комиссия контекстной рекламы по умолчанию:</label>
                                <div class="formRight" style="margin-right:0; margin-left: 10px; width: 100px; float:left;">
                                    <input type="text" name="commission_context" value='<?php echo $this->systemSettings['commission_context']; ?>' /></div>
                            </div>
                            <input type="submit" name="submit_commission_context" value="Сохранить" class="button basic" style="float:right"/>
                        </form>
                    </td>
                    
                </tr>
            </tbody>
        </table>

        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/'.$action; ?>' method="post" class="form">
            <table style="width:100%">
                <tbody>
                    <tr>
                        <td>
                            <div class="formRow">
                                <label style="margin-top:18%;">Выбор рекламодателей:</label>
                                <div class="formRight" style="margin-right:0; width: 300px;">
                                    <select multiple="multiple" name="select[]" class="multiple" title="Click to Select a User">
                                        <?php foreach ($this->allAdvertisers as $advertiser) : ?>
                                            <?php if ($advertiser['commission'] != null) { ?>
                                                <option value='<?php echo $advertiser['id']; ?>'><?php echo $advertiser['login'].' - '.$advertiser['commission'].'%'; ?></option>
                                            <?php } else { ?>
                                                <option value='<?php echo $advertiser['id']; ?>'><?php echo $advertiser['login'].' - system commission'; ?></option>
                                            <?php } ?>    
                                        <?php endforeach; ?>
                                    </select>
                                </div>
                                <div class="clear"></div>
                            </div>
                        </td>
                        <td style="width:38%">
                            <div class="formRow" style="border-bottom-style: none;">
                                <label>Комиссия для выбранных рекламодателей:</label>
                                <div class="formRight" style="margin-right:0; width: 100px;">
                                    <input type="text" name="rate" value="" /></div>
                                <div class="clear"></div>
                            </div>
                        </td>
                        <td style="width:15%">
                            <input type="submit" name="submit_rate"  value="Сохранить" class="button basic"/>
                        </td>
                    </tr>
                </tbody>
            </table>
        </form>

        <div class="line"></div>

        <table style="width:97%; margin-top:20px;">
            <tbody>
                <tr>
                    
                    <td width=49%>
                        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/updatesystem'; ?>' method="post" class="form">
                            <div class="formRow" style="border-bottom-style: none; padding-top: 0px; padding-bottom: 0px;">
                                <label>Коэффициент влияния БИДа:</label>
                                <div class="formRight" style="margin-right:0; margin-left: 75px; width: 100px; float:left;">
                                    <input type="text" name="coefficient_bid" value='<?php echo $this->systemSettings['coefficient_bid']; ?>' /></div>
                            </div>
                            <input type="submit" name="submit_coefficient_bid" value="Сохранить" class="button basic" style="float:right"/>
                        </form>
                    </td>
                    
                    <td style="padding-left: 30px;">
                        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/updatesystem'; ?>' method="post" class="form">
                            <div class="formRow" style="border-bottom-style: none; padding-top: 0px; padding-bottom: 0px;">
                                <label>Коэффициент влияния давности:</label>
                                <div class="formRight" style="margin-right:0; margin-left: 50px; width: 100px; float:left;">
                                    <input type="text" name="coefficient_prescription" value='<?php echo $this->systemSettings['coefficient_prescription']; ?>' /></div>
                            </div>
                            <input type="submit" name="submit_coefficient_prescription" value="Сохранить" class="button basic" style="float:right"/>
                        </form>
                    </td>
                    
                </tr>
            </tbody>
        </table>

        <table style="width:97%; margin-top:20px;">
            <tbody>
                <tr>
                    
                    <td width=49%>
                        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/updatesystem'; ?>' method="post" class="form">
                            <div class="formRow" style="border-bottom-style: none; padding-top: 0px; padding-bottom: 0px;">
                                <label>Коэффициент влияния геолокации:</label>
                                <div class="formRight" style="margin-right:0; margin-left: 43px; width: 100px; float:left;">
                                    <input type="text" name="coefficient_geolocation" value='<?php echo $this->systemSettings['coefficient_geolocation']; ?>' /></div>
                            </div>
                            <input type="submit" name="submit_coefficient_geolocation" value="Сохранить" class="button basic" style="float:right"/>
                        </form>
                    </td>
                    
                    <td style="padding-left: 30px;">
                        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/updatesystem'; ?>' method="post" class="form">
                            <div class="formRow" style="border-bottom-style: none; padding-top: 0px; padding-bottom: 0px;">
                                <label>Коэффициент влияния ключевых слов:</label>
                                <div class="formRight" style="margin-right:0; margin-left: 18px; width: 100px; float:left;">
                                    <input type="text" name="coefficient_keywords" value='<?php echo $this->systemSettings['coefficient_keywords']; ?>' /></div>
                            </div>
                            <input type="submit" name="submit_coefficient_keywords" value="Сохранить" class="button basic" style="float:right"/>
                        </form>
                    </td>
                    
                </tr>
            </tbody>
        </table>

        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/updatesystem'; ?>' method="post" class="form">
            <table style="width:55%">
                <tbody>
                    <tr>                        
                        <td style="width:70%">
                            <div class="formRow" style="border-bottom-style: none;">
                                <label>Коэффициент влияния маркетинговых модулей:</label>
                                <div class="formRight" style="margin-right:0; width: 100px;">
                                    <input type="text" name="coefficient_marketing_module" value='<?php echo $this->systemSettings['coefficient_marketing_module']; ?>' /></div>
                                <div class="clear"></div>
                            </div>
                        </td>
                        <td>
                            <input type="submit" name="submit_coefficient_marketing_module" value="Сохранить" class="button basic"/>
                    </tr>
                </tbody>
            </table>
        </form>

        <div class="line"></div>

        <form action='<?php echo $lang.'/'.$module.'/'.$controller.'/updatesystem'; ?>' method="post" class="form">
            <table style="width:55%">
                <tbody>
                    <tr>
                        <td style="width:70%">
                            <div class="formRow" style="border-bottom-style: none;">
                                <label>Пороговый уровень безопасности:</label>
                                <div class="formRight" style="margin-right:0; width: 100px;">
                                    <input type="text" name="safe_level" value='<?php echo $this->systemSettings['safe_level']; ?>' /></div>
                                <div class="clear"></div>
                            </div>
                        </td>
                        <td>
                            <input type="submit" name="submit_safe_level" value="Сохранить" class="button basic"/>
                    </tr>
                </tbody>
            </table>
        </form>

    </div>		 
</div>